package com.learn.aop;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class ExecutionAop {

    @Before("@within(com.learn.annotation.Secure)")
    public void execute1(){
        System.out.println("@within(com.learn.annotation.Secure)");
    }

    @Before("execution(* com.learn..*(..)) && @target(com.learn.annotation.Secure)")
    public void execute2(){
        System.out.println("@target(com.learn.annotation.Secure)");
    }

}
